Acquire
TheAcquire
method increments an object's reference count by 1.
void Acquire ();DISCUSSION
Most methods that return a reference to a reference-counted object increment the object's reference count. However, if your part obtains a reference to a reference-counted object from a method that does not increment the object's reference count, you should call the object'sAcquire
method before you cache the reference in any data structure. When the reference is replaced or removed from the data structure, you should call the object'sRelease
method to decrement its reference count.OVERRIDING
Every subclass ofODRefCntObject
has its own version of theAcquire
method. Your subclass ofODPart
overrides this method if your part performs any specific actions when its reference count is incremented. The override method must call its inheritedAcquire
method at the beginning of its implementation.SEE ALSO
TheODRefCntObject::Release
method (page 577).
TheODPart
class (page 459).
Table 2-1 on page 90 in OpenDoc Programmer's Guide.
"Reference-Counted Objects" on page 468 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help